.class Llt/noframe/gpsfarmguide/gui/ManualGui$4;
.super Ljava/lang/Object;
.source "ManualGui.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/gui/ManualGui;->setButtonListeners()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Llt/noframe/gpsfarmguide/gui/ManualGui;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/gui/ManualGui;)V
    .locals 0

    .line 134
    iput-object p1, p0, Llt/noframe/gpsfarmguide/gui/ManualGui$4;->this$0:Llt/noframe/gpsfarmguide/gui/ManualGui;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 2

    .line 137
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getSelectedMarker()Lcom/google/android/gms/maps/model/Marker;

    move-result-object p1

    if-eqz p1, :cond_2

    .line 138
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object p1

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getSelectedMarker()Lcom/google/android/gms/maps/model/Marker;

    move-result-object v0

    invoke-virtual {p1, v0}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getPreviousMarker(Lcom/google/android/gms/maps/model/Marker;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object p1

    .line 139
    invoke-virtual {p1}, Lcom/google/android/gms/maps/model/Marker;->getSnippet()Ljava/lang/String;

    move-result-object v0

    const-string v1, "marker_mid"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 140
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getAddDeleteState()Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;

    move-result-object v0

    new-instance v1, Llt/noframe/gpsfarmguide/states/add_delete_states/AddState;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/states/add_delete_states/AddState;-><init>()V

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;->setState(Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteState;)V

    goto :goto_0

    .line 141
    :cond_0
    invoke-virtual {p1}, Lcom/google/android/gms/maps/model/Marker;->getSnippet()Ljava/lang/String;

    move-result-object v0

    const-string v1, "marker"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 142
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getAddDeleteState()Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;

    move-result-object v0

    new-instance v1, Llt/noframe/gpsfarmguide/states/add_delete_states/DeleteState;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/states/add_delete_states/DeleteState;-><init>()V

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteStatesController;->setState(Llt/noframe/gpsfarmguide/states/add_delete_states/AddDeleteState;)V

    .line 143
    :cond_1
    :goto_0
    invoke-static {}, Llt/noframe/gpsfarmguide/utils/Drawing;->deselectMarker()V

    .line 144
    invoke-static {p1}, Llt/noframe/gpsfarmguide/utils/Drawing;->selectMarker(Lcom/google/android/gms/maps/model/Marker;)V

    goto :goto_1

    .line 146
    :cond_2
    iget-object p1, p0, Llt/noframe/gpsfarmguide/gui/ManualGui$4;->this$0:Llt/noframe/gpsfarmguide/gui/ManualGui;

    invoke-static {p1}, Llt/noframe/gpsfarmguide/gui/ManualGui;->access$000(Llt/noframe/gpsfarmguide/gui/ManualGui;)Landroid/content/Context;

    move-result-object p1

    iget-object v0, p0, Llt/noframe/gpsfarmguide/gui/ManualGui$4;->this$0:Llt/noframe/gpsfarmguide/gui/ManualGui;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/gui/ManualGui;->access$000(Llt/noframe/gpsfarmguide/gui/ManualGui;)Landroid/content/Context;

    move-result-object v0

    const v1, 0x7f11015b

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p1, v0}, Llt/noframe/gpsfarmguide/widgets/MegaToast;->showTextLong(Landroid/content/Context;Ljava/lang/String;)Llt/noframe/gpsfarmguide/widgets/MegaToast;

    :goto_1
    return-void
.end method
